﻿using ChainResponsibility.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChainResponsibility
{
    /// <summary>
    /// 开会决议类
    /// </summary>
    public class Congress : Approver
    {

        public override void Operation(PurchaseArgs args)
        {
            if (args.TotalMoney < 1000000f)
            {
                Console.WriteLine($"{Name}处理了该条订单{args.ObjectName}，金额为{args.TotalMoney}");
            }
            else
            {
                Console.WriteLine($"订单废弃");
            }
        }

        public Congress(string name) : base(name)
        {
        }
    }

}
